package com.huffman.smart_picture.domain.vo.space;

import com.huffman.smart_picture.domain.entity.Space;
import lombok.Data;

import java.util.List;

/**
 * @author DengLin
 * @title 缩略空间信息
 * @date 2025/6/25
 */
@Data
public class AbbreviationSpaceVo {
    private Long id;
    private String spaceName;
    private Long totalCount;
    private List<String> memberAvatars;
    /**
     * 空间级别：0-普通版 1-旗舰版 2-专业版
     */
    private Integer spaceLevel;


    public static AbbreviationSpaceVo convert(Space space){
        AbbreviationSpaceVo abbreviationSpaceVo = new AbbreviationSpaceVo();
        abbreviationSpaceVo.setId(space.getId());
        abbreviationSpaceVo.setSpaceName(space.getSpaceName());
        abbreviationSpaceVo.setTotalCount(space.getTotalCount());
        abbreviationSpaceVo.setSpaceLevel(space.getSpaceLevel());
        return abbreviationSpaceVo;
    }
}
